import os
import torch

class Config:
    # 数据路径
    train_path = "../../nlp_data/data/train.json"
    dev_path = "../../nlp_data/data/dev.json"
    test_path = "../../nlp_data/data/test.json"
    model_dir = "saved_model/"
    log_dir = "logs/"

    # 模型参数
    bert_model = "./bert-base-chinese"  # 中文BERT预训练模型
    bert_hidden_size = 768
    max_seq_len = 128
    dropout = 0.1


    # 训练参数
    batch_size = 32
    epochs = 20
    lr = 2e-5
    device = "cuda" if torch.cuda.is_available() else "cpu"

    # 创建目录
    os.makedirs(model_dir, exist_ok=True)
    os.makedirs(log_dir, exist_ok=True)
